Page({
  data: {
    schema: [{
      label:'百分比',
      prop:'percent',
      type:'number'
    },{
      label:'显示数值',
      prop:'showInfo',
      type:'switch'
    },{
      label:'圆角大小',
      prop:'borderRadius',
      type:'number'
    },{
      label:'字体大小',
      prop:'fontSize',
      type:'number',
    },{
      label:'线宽',
      prop:'strokeWidth',
      type:'number',
    },{
      label:'颜色',
      prop:'activeColor',
      type:'text',
    },{
      label:'背景颜色',
      prop:'backgroundColor',
      type:'text',
    },{
      label:'动画',
      prop:'active',
      type:'switch',
    },{
      label:'动画模式',
      prop:'activeMode',
      type:'picker',
      labelOptions:['动画从头播','动画从上次结束点接着播'],
      valueOptions:['backwards','forwards']
    },{
      label:'动画时间',
      prop:'duration',
      type:'number',
    }],
    formData: {
      percent:50,
      showInfo:false,
      borderRadius:0,
      fontSize:16,
      strokeWidth:6,
      activeColor:'#09BB07',
      backgroundColor:'#EBEBEB',
      active:false,
      activeMode:'backwards',
      duration:30
    },
    title: '',
    result: '',
    zh:'',
    apiType: '',
    remark: '',
    webUrl: '',
    apiName: '',
  },
  onShareAppMessage() {
    return {
      title: 'progress',
      path: 'packageComponent/pages/content/progress/progress'
    }
  },
  onLoad(options) {
    this.setData({
      apiType: options.zh,
      title: options.title,
      zh: options.zh,
      remark: options.remark,
      webUrl: options.docUrl
    })
  },
  getFormData(e){
    this.setData({
      formData:e.detail.formData
    })
  }
})
